#include "comm.hpp"

int main()
{
    //1.获取管道文件
    int fd = open(ipcPath.c_str(),O_WRONLY);
    if(fd < 0)
    {
        perror("open");
        exit(1);
    }

    string buff;
    int count = 0;
    while(true)
    {
        cout << "Please Enter Message Line :>";
        getline(cin,buff);
        write(fd,buff.c_str(),buff.size());
        count++;
        if(count == 5) break;
    }

    close(fd);
    return 0;
}